﻿@model IEnumerable<PhotoBlog.Core.Models.Blog>

<p>
    @Html.ActionLink("Создать", "Create")
</p>
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.HeaderName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ContentText)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DatePublish)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.User.Login)
        </th>
        <th></th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.HeaderName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ContentText)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.DatePublish)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.User.Login)
            </td>
            <td>
                @Html.ActionLink("Ред.", "Edit", new { id = item.BlogId }) |
                @Html.ActionLink("Удалить", "Delete", new { id = item.BlogId })
            </td>
        </tr>
    }

</table>
